package com.hdwe.tools.pm.domain.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hdwe.tools.pm.domain.PmMilestone;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.time.LocalDateTime;

/**
 * 小目标业务对象 pm_milestone
 *
 * @author s
 * @date 2024-12-10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = PmMilestone.class, reverseConvertGenerate = false)
public class PmMilestoneBo extends BaseEntity {

    /**
     * 主键
     */
    private Long id;

    /**
     * 租户编号
     */
    private String tenantId;

    /**
     * 项目编号
     */
    @NotBlank(message = "项目编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String projectId;

    /**
     * 小目标名
     */
    @NotBlank(message = "小目标名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String milestoneName;

    /**
     * 排序
     */
    private Long milestoneSort;

    /**
     * 关联人员
     */
    private String relatedUsers;

    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startDate;

    /**
     * 截止时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endDate;

    /**
     * 耗时
     */
    private Long costTime;

    /**
     * 样式
     */
    private String classStyle;

    /**
     * 状态
     */
    @NotBlank(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

    /**
     * 备注
     */
    private String remark;

}
